package com.heima.admin.controller.v1;

import com.heima.admin.service.AdAuthService;
import com.heima.model.admin.dtos.AdAuthDto;
import com.heima.model.common.dtos.ResponseResult;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/auth")
@RequiredArgsConstructor
public class AdAuthController {

    private final AdAuthService adAuthService;

    //update-test

    /**
     * 查询用户列表
     * @param dto
     * @return
     */
    @PostMapping("/list")
    public ResponseResult list(@RequestBody AdAuthDto dto) {
        return adAuthService.findList(dto);
    }

    /**
     * 查询审核失败用户列表
     * @param dto
     * @return
     */
    @PostMapping("/authFail")
    public ResponseResult listFail(@RequestBody AdAuthDto dto) {
        return adAuthService.findList(dto);
    }

    /**
     * 查询审核成功用户列表
     * @param dto
     * @return
     */
    @PostMapping("/authPass")
    public ResponseResult listPass(@RequestBody AdAuthDto dto) {
        return adAuthService.findList(dto);
    }
}
